const request = require('request');

/**
 *  请求
 * @param {Object} option
 */
exports.req = (option = {}) => {
    return new Promise((resolve, reject) => {
        const callback = (error, response, body) => {
            if (error) {
                reject(error);
            }
            resolve([response, body]);
        };
        request(option, callback);
    });
};
